﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
	<title>Running ConsoleZ</title>
	<meta http-equiv="content-type" content='text/html; charset=utf-8' />
	<link rel="stylesheet" type="text/css" href="../styles/help.css" />
</head>

<body>
	<h1>Running ConsoleZ</h1>
<!--
	<p>
		Console setup creates shortcuts in the Start menu (Console group), on 
		the desktop and in the quick launch bar. Any of these shortcuts will
		run ConsoleZ with its default configuration, read from console.xml file
		located in ConsoleZ program directory.
	</p>
-->
	<h2>Command line parameters</h2>
	
	<p>
		ConsoleZ supports these command line parameters:
	</p>

	<p class="block-row-name">-c &lt;configuration file&gt;</p>
	<p class="block-row-description">
		Specifies a configuration file.
	</p>
	<br/>

	<p class="block-row-name">-w &lt;main window title&gt;</p>
	<p class="block-row-description">
		Sets main window title. This option will override all other main 
		window title settings (e.g. 'use tab titles' setting)
	</p>
	<br/>

	<p class="block-row-name">-ws &lt;workspace&gt;</p>
	<p class="block-row-description">
		Specifies a <a href=html\workspaces.html>workspace</a> file.
	</p>
	<br/>

	<p class="block-row-name">-t &lt;tab type&gt;</p>
	<p class="block-row-description">
		Specifies a startup tab type. <b>Tab must be defined in ConsoleZ settings.</b>
	</p>
	<br/>
	
	<p class="block-row-name">-n &lt;tab name&gt;</p>
	<p class="block-row-description">
		Specifies a startup tab name.
	</p>
	<br/>	

	<p class="block-row-name">-d &lt;directory&gt;</p>
	<p class="block-row-description">
		Specifies a startup directory. If you want to parametrize startup dirs,
		you need to specify startup directory parameter as "%1"\ (backslash is 
		<b>outside</b> of the double quotes)
	</p>
	<br/>

	<p class="block-row-name">-r &lt;arguments&gt;</p>
	<p class="block-row-description">
		Appends arguments to the startup shell command line.
		<b>Do not confuse whith a command that you type in the shell!</b>
	</p>
	<br/>

	<p class="block-row-name">-p &lt;base priority&gt;</p>
	<p class="block-row-description">
		Specifies shell base priority.<br/>
    <b>Idle</b>: Specifies that the threads of this process run only when the
    system is idle.<br/>
    <b>The idle priority class is inherited by child processes.</b>
    <br/>
    <br/>
    <b>BelowNormal</b>: Specifies that the process has priority above Idle
    but below Normal.<br/>
    <b>The below normal priority class is inherited by child processes.</b>
    <br/>
    <br/>
    <b>Normal</b>: Specifies that the process has no special scheduling needs.
    <br/>
    <br/>
    <b>AboveNormal</b>: Specifies that the process has priority above Normal
    but below High.
    <br/>
    <br/>
    <b>High</b>: Specifies that the process performs time-critical tasks
    that must be executed immediately, regardless of the load on the operating
    system. The threads of the process preempt the threads of normal or idle
    priority class processes. <b>Use extreme care when specifying High for the
    process's priority class, because a high priority class application can use
    nearly all available processor time.</b>
    <br/>
    <br/>
    <b>Realtime</b>: Specifies that the process has the highest possible priority.
    <b>The threads of a process with RealTime priority preempt the threads of all
    other processes, including operating system processes performing important tasks.
    Thus, a RealTime priority process that executes for more than a very brief
    interval can cause disk caches not to flush or cause the mouse to be unresponsive.</b>
	</p>
	<br/>

	<p class="block-row-name">-ts &lt;sleep time&gt;</p>
	<p class="block-row-description">
		Specifies a sleep time (<b>in milliseconds</b>) before starting next tab. Only used when multiple tabs are specified.
	</p>
	<br/>

	<p class="block-row-name">-v &lt;visibility&gt;</p>
	<p class="block-row-description">
		Specifies the visibility of the application.<br/>
    <b>Show</b>: Shows the application.<br/>
    <b>Hide</b>: Hides the application.<br/>
    <b>Switch</b>: Switches the application visibility. Shows the application if it is hidden
    and hides the application if it is visible.
	</p>
	<br/>

	<p class="block-row-name">-reuse</p>
	<p class="block-row-description">
		Reuses another instance, if any exists, instead of starting a new one.
	</p>
	<br/>

	<p>
		<b>Note:</b> -t option is not used to set tab's title. It specifies one
		of the names of the tabs defined in ConsoleZ settings.
	</p>
	<p>
		<b>Note:</b> If you specify multiple -t options, you can specify 
		multiple -d and -r options as well. In that case, each -t, -d and -r 
		option will be grouped together.<br />
		If there is no corresponding -d option for a -t option,
		the initial directory from that tab's settings will be used.<br />
		For example:
		<br /><br />
		Console.exe -t powershell -d C:\WINDOWS -r <b>&quot;</b>-NoExit -Command &quot;&quot;&quot;Write-Host 'Hello World' -ForeGroundColor yellow&quot;&quot;&quot;<b>&quot;</b> -t cmd -d D:\ -t ncftp
		<br /><br />
		Will start
		<ul>
			<li>'powershell' tab in C:\WINDOWS, running <i>Write-Host 'Hello World' -ForeGroundColor yellow</i> command in it</li>
			<li>'cmd' tab in D:\.</li>
			<li>'ncftp' tab will be started in the initial directory specified in its settings.</li>
		</ul>
	</p>
	<p>
		<b>Note:</b> -ts option can be useful if you want to start multiple 
		instances of a tab, and tab's shell needs write access to some files 
		during initialization Using -ts option, you can specify time to sleep 
		between starting the next tab, giving each shell enough time to 
		initialize itself.
	</p>
</body>

</html>